<script setup>
import * as FileApis from "@/api/file";
import UserAvatar from "@/components/common/UserAvatar.vue";

const props = defineProps(['avatar', 'userId', 'userName', 'postTime'])
</script>

<template>
  <div class="inline-block">
    <div class="flex flex-row mt-3">
      <div class="flex items-center">
        <UserAvatar :size="30" :file-id="props.avatar"></UserAvatar>
      </div>
      <div class="ml-2">
        <RouterLink :to="'/user/center/' + userId"><p class="text-xs mb-1 hover-primary">{{ props.userName }}</p></RouterLink>
        <p class="text-xs">发布于 {{ props.postTime }}</p>
      </div>
    </div>
  </div>
</template>

<style scoped>

</style>